package com.ksyun.alert.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ksyun.alert.entity.base.BaseDO;
import lombok.*;

import java.io.Serializable;

/**
 * 告警记录表实体类
 * @author hantou
 * @date 2024-05-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = false)
@TableName("tb_alert_records")
public class AlertRecordsDO extends BaseDO implements Serializable{

    private static final long serialVersionUID = 1L;

    /**
     * 主键，唯一标识
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 关联的告警规则id
     */
    private Integer ruleId;

    /**
     * 告警触发时间
     */
    @TableField("`timestamp`")
    private Long timestamp;

    /**
     * 告警信息
     */
    private String alertMessage;

    /**
     * 告警级别
     */
    private int severity;

    /**
     * 主机名称
     */
    private String hostName;

    /**
     * 主机ip地址
     */
    private String hostIp;
}
